package com.zenaprod.zenda.ui;

import com.zenaprod.twodcore.ui.GameView;
import com.zenaprod.zenda.bag.BagModel;
import com.zenaprod.zenda.bag.BagView;
import com.zenaprod.zenda.config.Config;

import java.awt.*;


public class ZendaView extends GameView {
    private static ZendaView zendaView = null;
    private BagView bagView;


    public static ZendaView getInstance() {
        if (zendaView == null) {
            zendaView = new ZendaView();
        }
        return zendaView;
    }


    private ZendaView() {
        super(Config.getInstance().width, Config.getInstance().height, Config.getInstance().fps);

        BagModel bag = new BagModel(10, 5);
        Dimension bagSize = BagView.calculateSize(bag);
        bagView = new BagView(this, bag, 0, 0, (int) bagSize.getWidth(), (int) bagSize.getHeight());
        ui.addMenuFrame(bagView);

        startRepaint();
    }


    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        Graphics2D g2D = (Graphics2D) g;
    }

}
